<?php

class Application_View_Helper_SecondNavigation extends Zend_View_Helper_Abstract {

    protected $result;

    public function secondNavigation() {
	return $this;
    }

    public function getResult() {
	$this->result = $this->htmlUl($this->result);
	return $this->result;
    }

    public function back($uri) {
	$html = $this->link($uri, '/img/back.png', 'Назад');
	$html = $this->htmlLi($html);
	$this->result .= $html;
	return $this;
    }

    public function add($uri){
	$html = $this->link($uri, '/img/add.png', 'Добавить');
	$html = $this->htmlLi($html);
	$this->result .= $html;
	return $this;
    }




    protected function link($href, $image, $alt) {
	return "<a href='$href'><img alt='$alt' title='$alt' src='$image' /></a>";
    }
    
    protected function htmlLi($html){
	$newHtml = "<li>$html</li>";
	return $newHtml;
    }
    
    protected function htmlUl($html){
	$newHtml = "<ul>$html</ul>";
	return $newHtml;
    }

}

?>
